package com.entity;

import java.util.List;

public class Classes {

	private Integer id;
	
	private String name;
	
	private List<Student> stdList;
	
	/**
	* class表中有一个teacher_id字段，所以在Classes类中定义一个teacher属性，
	* 用于维护teacher和class之间的一对一关系，通过这个teacher属性就可以知道这个班级是由哪个老师负责的
	*/
	private Teacher teacher;
	

	@Override
	public String toString() {
		return "Classes [id=" + id + ", name=" + name + ", stdList=" + stdList + ", teacher=" + teacher + "]";
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public List<Student> getStdList() {
		return stdList;
	}

	public void setStdList(List<Student> stdList) {
		this.stdList = stdList;
	}
}
